﻿@{
    Layout = null;
}
<!DOCTYPE html>
@Html.Partial("LoadPanelPartial")
<html>
<head>
    <title>Index</title>
         @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    
    @Html.DevExpress().GetStyleSheets(
                new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme }

    )
    @Html.DevExpress().GetScripts(
                    new Script { ExtensionType = ExtensionType.ListBox }
    )
    
    <script type="text/javascript">
        function OK() {

            lpModal.Show();
            var codeNo = comboBox.GetValue();
            var upLevelAmount = FUpLevelAmount.GetText();
            var localAmount = FLocalAmount.GetText();
            var note = FNote.GetText();
            var text = comboBox.GetText();
            var txt = text.split(";");
            if (localAmount == "") {
                localAmount = 0;
            }
            if (upLevelAmount == "") {
                upLevelAmount = 0;
            }
            if (pd(codeNo, upLevelAmount)) {
                parent.ok(txt[0], codeNo, localAmount, upLevelAmount, note);
                lpModal.Hide();
            } else {
                lpModal.Hide();
            }
        }

        function pd(codeNo, codeName) {
            var bl = true;
//            if (null == codeNo || ASPxClientUtils.Trim(codeNo) == "") {
//                tbCodeNo.SetErrorText("请选择纳税识别号");
//                tbCodeNo.SetIsValid(false);
//                bl = false;
//            }
            if (null == codeName || ASPxClientUtils.Trim(codeName) == "") {
                FUpLevelAmount.SetErrorText("请填写补助金额");
                FUpLevelAmount.SetIsValid(false);
                bl = false;
            }
            if (isNaN(FUpLevelAmount.GetText())) {
                FUpLevelAmount.SetErrorText("请输入数字");
                FUpLevelAmount.SetIsValid(false);
                bl = false;
            }
            if (isNaN(FLocalAmount.GetText())) {
                FLocalAmount.SetErrorText("请输入数字");
                FLocalAmount.SetIsValid(false);
                bl = false;
            }
            return bl;
        }

    </script>

</head>
<body>
    <div>

    <table class="tableFrom">
        <tr>
            <th style=" width:150">
               纳税人名称:</th>
            <td>
                @Html.Partial("LargeDataComboBoxPartial")
            </td>
        </tr>
        <tr>
            <th style=" width:150">
                补助金额:</th>
            <td>
                @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FUpLevelAmount";
                   settings.Width = 200;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
                <tr>
            <th style=" width:150">
                地方配套:</th>
            <td>
                @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FLocalAmount";
                   settings.Width = 200;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
                         <tr>
            <th style=" width:150">
                备注:</th>
            <td>
                @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FNote";
                   settings.Width = 200;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
          <tr>
          <td align="center" colspan="2" style="color: #FF0000"> 注:金额单位为元</td>
          
          </tr>
       
   </table>

    <script>
        lp.Hide();
    </script>

         

    </div>
</body>
</html>
